1. Field of the Invention
The present invention relates to an image processing method and an image processing apparatus for correcting for color shift (color registration error, out of color registration) occurring in color image data.
2. Related Background Art
An image forming apparatus such as a color copier, or a color, multi-functional apparatus, that reads an original image and forms a color image includes an image scanner unit for reading images and a printer unit for printing the images read by the image scanner. Further, image scanner apparatuses are widely employed with personal computers for reading in originals as electronic image data.
An image scanner unit or an image scanner apparatus generally employs a line sensor, such as a charge coupled device (CCD) or a contact image sensor (CIS), wherein multiple light-receiving devices (photo-electric converting devices that accumulate incident light and convert it into an electric signal) are linearly arranged. And the image scanner unit or the image scanner apparatus reads an original image by moving the line sensor in a direction (a sub-scanning direction) perpendicular to the direction (the main scanning direction) in which the light-receiving devices are arranged. Some image scanner units or image scanner apparatuses are so configured that when reading images the original is moved while a line sensor is fixed.
In either event, whether an image is read while the line sensor or the original is moved, color shift occurs due to mechanical vibrations, transmitted by the drive mechanism while moving the line sensor or the original in the sub-scanning direction, or due to the affect of feeding accuracy.
As one process employed for reading an image, a sequential line reading method is used, and in the method, the sequential emission, by light sources, of light in three colors, R (red), G (green) and B (blue) is conducted, and these three colors are used to read an original image. According to the sequential line reading method, since generally either the line sensor or the original to be read is moved sequentially, the reading positions at the light emission timings of the R, G, B colors are shifted in the sub-scanning direction, as described above, so that when an original, such as a character or a line drawing, is read, color shift occurs and the image quality is deteriorated accordingly.
In order to correct or reduce color shift, various image processing methods have been proposed.
According to one of these image processing methods, a color shift correction process is employed that provides for the replacement of the image data read for each line by a weighted average obtained for the image data in that line and the image data in an immediately preceding or succeeding line of the same color. In Japanese Patent Application Laid-Open No. 2000-224375, a method is disclosed whereby the order in which R, G, B light is emitted is arranged so as to further improve the positioning accuracy of the R, G, B colors in the individual lines after averaging has been performed. Further, in Japanese Patent Application Laid-Open No. 2002-142122, a method is disclosed whereby each line is read at double the resolution in the sub-scanning direction, the weighted average is calculated for the image data in that line and the image data in the immediately preceding and succeeding line, and thereafter, a thinning operation is performed.
According to another method disclosed in Japanese Patent Application Laid-Open No. Hei 04-011458, image data read by the emission of individual light colors are converted into luminance data and color difference data, and a spatial frequency band limitation is applied only to the color difference data, so that color shift is reduced while resolution is maintained. In Japanese Patent Application Laid-Open No. 2003-259135, a still another method is disclosed whereby image data are converted into luminance data and saturation data, and of the pixels neighboring each target pixel, the one having the lowest luminance is regarded as a determination pixel, and whereby, when it is determined in accordance with the saturation data for the vicinity of the determination pixel that the target pixel has an achromatic color, the data for the target pixel are replaced with data for an achromatic color to change the image into a clear black image.
However, the method whereby image data for each read line are replaced by the weighted average for the image data of that line and image data for the immediately preceding or succeeding line of the same color is not preferable, because not only are pixels where color shift occurs, but also the basic function, i.e., the image resolution, is reduced. In addition, as a result of the weighted average processing, color shift is reduced but is not completely removed.
Further, according to the method whereby each line is read at double the resolution in the sub-scanning direction, the weighted average process is performed for the obtained image data and the resultant data are thinned out, a reduction in the resolution can be avoided. However, since the reading resolution is doubled, accordingly, the amount of pixel data to be processed is also doubled. That is, for a color shift correction circuit for which the operating speed remains the same, twice the reading time would be required. Although this method could be employed without extending the reading time by doubling the operating speed of the color shift correction circuit, the cost of an apparatus would be increased to realize a circuit structure that could operate at the high speed required, and therefore, this method is also not preferable.
Furthermore, according to the method whereby spatial frequency band limitation is provided only for color difference data, the resolution, the reading time and the cost are less affected. However, the degree of color shift is merely reduced by the spatial frequency band limitation, and is not still completely removed.
Moreover, according to the method whereby a pixel determined to be an achromatic color is replaced with black (or gray), satisfactory effects can be obtained for black characters. However, no process is performed, for example, for color shift at the contours of characters having other colors and for color shift at black characters in a chromatic color background.
While focusing on these conventional shortcomings, the object of the present invention is to provide an image processing method and an image processing apparatus for correcting color shift occurring at the contours of characters, regardless of the character colors, and to output a clear image for which the color shift of contours is corrected, even when the background color is other than white.